public class maopao {
    public static void main(String[] args) {
        int[] arr = {165,23,163,70,-35};
        for (int i = 0; i <arr.length ; i++) {
            for (int j = 0; j <arr.length-i-1 ; j++) {
                if (arr[j+1]<arr[j]){
                    int tamp = arr[j+1];
                    arr[j+1]=arr[j];
                    arr[j]=tamp;
                }

            }
        }
        for (int i : arr) {
            System.out.println(i);
        }
    }
}
